package com.yvan.oss.client.config;

import lombok.Data;

import java.io.IOException;

/**
 * Title: OSSConfig
 * Description:
 *
 * @author Yvan
 * @date 2019-02-20 13:02
 */
@Data
public class OSSConfig {
    private String endpoint;       //连接区域地址
    private String accessKeyId;    //连接keyId
    private String accessKeySecret;    //连接秘钥
    private String bucketName;     //需要存储的bucketName
    private String picLocation;    //图片保存路径

    public OSSConfig() {
        try {
            this.endpoint = SystemConfig.getConfigResource("oss.endpoint");
            this.bucketName = SystemConfig.getConfigResource("oss.bucketName");
            this.picLocation = SystemConfig.getConfigResource("oss.picLocation");
            this.accessKeyId = SystemConfig.getConfigResource("oss.accessKeyId");
            this.accessKeySecret = SystemConfig.getConfigResource("oss.accessKeySecret");
        } catch (IOException e) {
            e.printStackTrace();
        }
    }


}
